﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Text.RegularExpressions;
using ZhiAo.WebLib.Data;
using ZhiAo.CommonLibrary;
using System.Collections.Generic;
using ZhiAo.Management;

public partial class ShuiWenJu_BaseData_SiteList : System.Web.UI.Page
{
    private TabDataQuery tabDataQuery = new TabDataQuery();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            this.TempHtml = tbData.Text;
            LoadData();
        }
    }

    protected string TempHtml
    {
        get { return ViewState["TempHtml"].ToString(); }
        set { ViewState["TempHtml"] = value; }
    }

    private void LoadData()
    {
        //表体
        tabDataQuery.trHtml = this.TempHtml;
        tbData.Text = tabDataQuery.BindData("SQ_STBPRP_B");
    }


    protected void btnExcel_Click(object sender, EventArgs e)
    {
        ExcelHelper excel = new ExcelHelper();
        tabDataQuery.thHtml = tbDataHead.Text;
        List<string> lstHead = tabDataQuery.GetHeadMark();
        DataTable dtData = tabDataQuery.GetDtData("SQ_STBPRP_B");
        excel.Export(lstHead, dtData);
    }

    protected void btnRef_Click(object sender, EventArgs e)
    {
        LoadData();
    }



    protected void btnDel_Click(object sender, EventArgs e)
    {
        LoadData();
    }
}
